package m1.client;


import m2.Composant;

public class Client extends Composant {

	public Client() {
		
		super("Client",null);
		SendRequestS sendRequestS = new SendRequestS();
		sendRequestS.setComposant(this);
		addServiceFourni(sendRequestS);
		addPortFournis(sendRequestS.getPortFourni());
		
		ReserveRequestS re = new ReserveRequestS();
		re.setComposant(this);
		addServiceRequis(re);
		addPortRequis(re.getPortRequis());
		re.getPortRequis().setComposant(this);
		
	}
	
	@Override
	public void update(Object o, Object arg) {
		System.out.println("\n\n=========Client==========");
		System.out.println("Message: "+ arg);
		notifyObservers(arg);
	}
	

}
